﻿using AZROLESLib;

// ReSharper disable CheckNamespace
namespace AzManContrib
// ReSharper restore CheckNamespace
{
// ReSharper disable InconsistentNaming
    public static class IAzClientContextExtensions
// ReSharper restore InconsistentNaming
    {

        public static bool AccessCheck(this IAzClientContext context, IAzOperation operation)
        {
            object[] result = (object[])context.AccessCheck("Auditstring", new object[1], new object[] { operation.OperationID }, null, null, null, null, null);
            return (int)result[0] == 0;
        }
    }
}